#ifndef BRG_HDMI_MIPI_H
#define BRG_HDMI_MIPI_H

#include "Nano100Series.h"
#include "Common.h"

#define BRG_HDMI_MIPI_RST_PORT		PC
#define BRG_HDMI_MIPI_RST_BIT		BIT2
#define BRG_HDMI_MIPI_RST_PIN		PC2

#define BRG_HDMI_MIPI_INT_PORT		PC
#define BRG_HDMI_MIPI_INT_BIT		BIT1
#define BRG_HDMI_MIPI_INT_PIN		PC1

#define BRG_HDMI_MIPI_AUDIO_PORT	PC
#define BRG_HDMI_MIPI_AUDIO_BIT		BIT0
#define BRG_HDMI_MIPI_AUDIO_PIN		PC0

void BrgHdmiMipiInit(void);
uint32_t BrgHdmiMipiIsHdmiActive(void);
void BrgHdmiMipiSetVideoTiming(enum video_timing_t timing);
void BrgHdmiMipiSetMipiOn(void);
void BrgHdmiMipiSetAudioOn(void);
void BrgHdmiMipiSetAudioOff(void);
void BrgHdmiMipiDumpRegs(void);

int BrgHdmiMipiI2cWrite8(uint16_t reg_addr, uint8_t reg_val);
int BrgHdmiMipiI2cWrite16(uint16_t reg_addr, uint16_t reg_val);
int BrgHdmiMipiI2cWrite32(uint16_t reg_addr, uint32_t reg_val);
int BrgHdmiMipiI2cRead8(uint16_t reg_addr, uint8_t *reg_val);
int BrgHdmiMipiI2cRead16(uint16_t reg_addr, uint16_t *reg_val);
int BrgHdmiMipiI2cRead32(uint16_t reg_addr, uint32_t *reg_val);

#endif
